Hello All,
While creating new requirements in DOORS DXL modules, we have mandated the users to provide some column values. In order to make it user friendly, we would like to highlight/differentiate the mandatory columns in DOORS modules. So that user can identify whether a column is optional or not. Is it possible to format the column heading via DXL scripts? How can we highlight the column headers, any ideas pls :)
Thank You. Adminani - Wed Jun 28 06:13:48 EDT 2017 |
Re: Highlighting Column Headers Sorry you cannot reformat the column headers ... But how about adding some text like: Analysis (*) (where * means mandatory). Too simple? Regards, Mathias |
Re: Highlighting Column Headers I do not think you can format the column title in any way. But of course, you can modify the title text to show that this column needs to be filled, e.g. "[-Source-]" instead of just "Source". Another way to do this is to just a trigger to force users fill attribute values for objects. |
Re: Highlighting Column Headers Mathias Mamsch - Wed Jun 28 07:11:10 EDT 2017 Sorry you cannot reformat the column headers ... But how about adding some text like: Analysis (*) (where * means mandatory). Too simple? Regards, Mathias Hello Mathias,
Yes this should be sufficient. Could you please share any sample scripts to achieve the same?
Thank You!!! |
Re: Highlighting Column Headers Adminani - Wed Jun 28 08:16:21 EDT 2017 Hello Mathias,
Yes this should be sufficient. Could you please share any sample scripts to achieve the same?
Thank You!!! You mean like: title (column 3, "Analysis (*)") ? I guess you would rather use the GUI to create a view containing your attributes and then edit the titles of the column accordingly, save the view. And then maybe later copy the view to all other similar modules by one of the available copyViews tools. But that would be another post. Regards, Mathias |
Re: Highlighting Column Headers Mathias Mamsch - Thu Jun 29 04:00:47 EDT 2017 You mean like: title (column 3, "Analysis (*)") ? I guess you would rather use the GUI to create a view containing your attributes and then edit the titles of the column accordingly, save the view. And then maybe later copy the view to all other similar modules by one of the available copyViews tools. But that would be another post. Regards, Mathias Not sure whether this is doable or not. We need as a script that can be triggered whenever a requirement is updated, so as and when the modules are saved, user will be prompted to fill out the mandatory fields. Any ideas on this? |
Re: Highlighting Column Headers Adminani - Thu Jun 29 04:41:58 EDT 2017 Not sure whether this is doable or not. We need as a script that can be triggered whenever a requirement is updated, so as and when the modules are saved, user will be prompted to fill out the mandatory fields. Any ideas on this? I would not advise to force the user to fill out the mandatory fields and not allow him to save. Rather I would create a DXL Layout Column that will check if all mandatory fields are filled and displays a nice red error for the objects where a mandatory field is missing (containing the title of the column that needs to be filled). If you rather want to force the user, then you need a "pre save" trigger that will perform the checks and disallow saving in case of missing fields. Regards, Mathias |
Re: Highlighting Column Headers Mathias Mamsch - Thu Jun 29 05:06:37 EDT 2017 I would not advise to force the user to fill out the mandatory fields and not allow him to save. Rather I would create a DXL Layout Column that will check if all mandatory fields are filled and displays a nice red error for the objects where a mandatory field is missing (containing the title of the column that needs to be filled). If you rather want to force the user, then you need a "pre save" trigger that will perform the checks and disallow saving in case of missing fields. Regards, Mathias Displaying of error message is a good note Mathias. Thanks for the point! Could you please share some sample snippets if available? As this is completely new for me!!
Many Thanks! |
Re: Highlighting Column Headers Adminani - Thu Jun 29 05:13:17 EDT 2017 Displaying of error message is a good note Mathias. Thanks for the point! Could you please share some sample snippets if available? As this is completely new for me!!
Many Thanks! Create a DXL Layout column with the following code:
DBE c = getCanvas()
bool textMissing = obj."Object Text" "" == "";
if (textMissing) {
realBackground(c, realColor_Red)
} else {
realBackground(c, realColor_Green)
}
This will give you something like an indicator column. You can then put another column beside it that shows a text with the missing columns. For some reasons I did not get layout dxl working with background and text at the same time. Regards, Mathias |
Re: Highlighting Column Headers Mathias Mamsch - Thu Jun 29 06:22:22 EDT 2017 Create a DXL Layout column with the following code:
DBE c = getCanvas()
bool textMissing = obj."Object Text" "" == "";
if (textMissing) {
realBackground(c, realColor_Red)
} else {
realBackground(c, realColor_Green)
}
This will give you something like an indicator column. You can then put another column beside it that shows a text with the missing columns. For some reasons I did not get layout dxl working with background and text at the same time. Regards, Mathias Thank You so much for the sample Mathias!!
I will try this out!! Big Cheers!! |
Re: Highlighting Column Headers Mathias Mamsch - Thu Jun 29 06:22:22 EDT 2017 Create a DXL Layout column with the following code:
DBE c = getCanvas()
bool textMissing = obj."Object Text" "" == "";
if (textMissing) {
realBackground(c, realColor_Red)
} else {
realBackground(c, realColor_Green)
}
This will give you something like an indicator column. You can then put another column beside it that shows a text with the missing columns. For some reasons I did not get layout dxl working with background and text at the same time. Regards, Mathias Hello, I need to trigger this script whenever the requirement is created/updated. Whether pre-save trigger suits here? Found from DXL manual, pre save only works on attribute. Thank You |
Re: Highlighting Column Headers Adminani - Mon Jul 03 04:45:01 EDT 2017 Hello, I need to trigger this script whenever the requirement is created/updated. Whether pre-save trigger suits here? Found from DXL manual, pre save only works on attribute. Thank You DXL Layout will update, whenever the user makes changes. The idea was to not use a trigger at all, but simply use a DXL Layout to hint the users to possible problems, but not force them to resolve them right away before saving. In the end, anyone can see from the history who made a change, but did not fill out mandatory attributes. Regards, Mathias |
Re: Highlighting Column Headers Mathias Mamsch - Mon Jul 03 08:00:19 EDT 2017 DXL Layout will update, whenever the user makes changes. The idea was to not use a trigger at all, but simply use a DXL Layout to hint the users to possible problems, but not force them to resolve them right away before saving. In the end, anyone can see from the history who made a change, but did not fill out mandatory attributes. Regards, Mathias Perfect!! Thank You so much Mathias !! :) |
Re: Highlighting Column Headers Adminani - Mon Jul 03 08:07:43 EDT 2017 Perfect!! Thank You so much Mathias !! :) Hi, With the same conditions applied, the mandatory attributes value need to be filled with asterisk.
Does the same approach of layout DXL column will work here. I tried but i couldn't achieve. The attribute value should be autofilled whenever a requirement is added or updated.
Thanks! |
Re: Highlighting Column Headers Adminani - Mon Jul 10 00:52:06 EDT 2017 Hi, With the same conditions applied, the mandatory attributes value need to be filled with asterisk.
Does the same approach of layout DXL column will work here. I tried but i couldn't achieve. The attribute value should be autofilled whenever a requirement is added or updated.
Thanks! You can use a default value for the creation. For the updates you will need a modify trigger, that will clear one attribute when another was edited. Make sure not to implement trigger cylcles (When A edit, modify B, when B edited modify C, when C edited modify A). I would suggest: - make a requirement type attribute. Give it a default value 'Heading' ... - make a post modify trigger for requirement type. if the requirement type was set to "Requirement" place the asterisk inside the mandatory attributes. - make a post modify trigger for the requirement text. if the text is modify reset the life cycle attributes. But be careful. Triggers like this will stress the nerves of the engineers to a point where they will want to hit you. As I said above, try not to force the people to renew the life cylce attributes (e.g. reason for change) whenever something changes. Instead hint them to fill the process attributes where they forgot and make sure history is preserved. If you need to very strongly adhere to a change process use a real change request system (DOORS had a native one once, does it still work? There are others.) Maybe that helps, regards, Mathias |